<?php
/**
 * 后台主页控制器
 * 
 * @author 高强
 */
class Manager_IndexController extends Zend_Controller_Action
{
	/**
	 * 控制器初始化
	 * 
	 * (non-PHPdoc)
	 * @see Zend_Controller_Action::init()
	 */
	public function init()
	{
		Zend_Loader::loadClass('LoginModel');
	}
	
	/**
	 * 系统登录
	 * 
	 * @ignore
	 */
    public function indexAction()
    {
    	$this->_helper->layout->disableLayout();
    	$action = $this->_request->getParam('a');
    	
    	switch($action)
    	{
    		case 'submit':
    			$this->_helper->viewRenderer->setNoRender(true);
    			if($this->_request->isPost())
    			{
    				$post = $this->_request->getPost();
    				$auth = new LoginModel();
    				$auth->logined($post['account'], $post['password']);
    			}
    			break;
    	}
    }

	
    public function homeAction()
    {
    	return true;
    }

    
}

